import http from ".";

/**
 * 学生列表
 */
const fetchList = () => http.get("/students");

/**
 * 添加学生
 * @param data
 */
const addItem = (
    realname: string,
    code: string,
    password: string,
    gid: string
) => http.post("/students", { realname, code, password, gid });

/**
 * 删除学生
 * @param id
 */
const removeItem = (id: string) => http.delete(`/students/${id}`);

export { fetchList, addItem, removeItem };
